import http from "../../utils/index"

/**
 * 登录
 * @param account
 * @param password
 * @returns {*}
 */
export function login({account, password}) {
    return http.post('api/sys/account/login', {account: account, password: password});
}

/**
 * 获取用户信息
 * @returns {*}
 */
export function userInfo() {
    return http.get('api/sys/account/userInfo');
}

/**
 * 分页查询
 * @param data
 * @returns {*}
 */
export function pager(data = {}) {
    return http.post('api/sys/account/pager', data);
}


/**
 * 保存
 * @param data
 */
export function save(data = {}) {
    return http.put('api/sys/account/save', data);
}

/**
 * 查找详细
 * @param id
 * @returns {*}
 */
export function details(id) {
    return http.get('api/sys/account/details/'+id);
}

/**
 * 删除
 * @param id
 * @returns {*}
 */
export function remove(id) {
    return http.delete('api/sys/account/remove/'+id);
}
